<script setup>
import {defineProps, defineEmits} from "vue"
defineProps({
  text: {
    type: String,
    default: '提交订单'
  }
})
const emit = defineEmits(['confirm']); // 定义事件
const confirmFn = () => {
  emit('confirm', true);
}
</script>

<template>
  <van-submit-bar :price="3050" :button-text="text"
                  @submit="confirmFn"
                  button-color="#235eff">
    <div class="text-[14px]">共2件</div>
  </van-submit-bar>
</template>

<style scoped>

</style>